<template>
  <div class="search-container" @keyup.enter="getStationList">
    <div class="title-container">
      <div class="title">站场</div>
    </div>
    <el-form :inline="true" size="large" :form="stationSearchForm" class="search-form">
      <div class="search-name">
        <el-input v-model="stationSearchForm.name" placeholder="名称" :prefix-icon="Search" />
        <el-input
          v-model="stationSearchForm.teamName"
          placeholder="所属井队"
          :prefix-icon="Search"
        />
      </div>
      <el-input v-model="stationSearchForm.position" placeholder="位置" :prefix-icon="Search" />
      <el-input v-model="stationSearchForm.type" placeholder="类型" :prefix-icon="Search" />
      <el-input v-model="stationSearchForm.radius" placeholder="创建时间" :prefix-icon="Clock" />
      <el-input
        v-model="stationSearchForm.createTime"
        placeholder="管线数量"
        :prefix-icon="Search"
      />
      <el-button type="primary" :icon="Search" @click="getStationList"> 搜索 </el-button>
    </el-form>
  </div>
</template>
<script setup name="PipelineSearchCom">
import { useStation } from '../hooks/useStation'
import { Search, Clock } from '@element-plus/icons-vue'
const { stationSearchForm, getStationList } = useStation()
</script>
<style lang="less" scoped>
.search-container {
  display: grid;
  grid-template-columns: 1fr 6fr;
  padding: 20px;
  .title-container {
    position: relative;
    .title {
      position: absolute;
      left: 0;
      top: 0;
      color: #303133;
      font-size: 16px;
      font-weight: bold;
    }
  }
  .search-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
    .search-name {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-gap: 10px;
    }
  }
}
</style>
